import React, { Component } from 'react';
// import { Button } from 'react-vant';
import { Tabbar } from 'react-vant'
import { FriendsO, HomeO, Search, SettingO } from '@react-vant/icons';
import { withRouter, Route } from 'react-router-dom';
import Home from '../router-view/Home'
// const Mycls = () => {

//     const changeTabbar = (active) => {
//         console.log(active);
//         switch (active) {
//             case 0:

//                 break;

//             default:
//                 break;
//         }

//     }

//     return (
//         <div>

//         </div>
//     );
// }

// export default Mycls;
// import React, { Component } from 'react';

class Mycls extends Component {
    changeTabbar = (active) => {
        switch (active) {
            case 0:
                this.props.history.push('/home')
                break;

            default:
                break;
        }
    }
    render() {
        return (
            <div>
                {/* 留坑 */}
                <Route path='/home' component={Home}></Route>


                {/* 配偶底部tabbar */}
                <Tabbar onChange={this.changeTabbar}>
                    <Tabbar.Item icon={<HomeO />}>首页</Tabbar.Item>
                    <Tabbar.Item icon={<Search />}>分类</Tabbar.Item>
                    <Tabbar.Item icon={<FriendsO />}>购物车</Tabbar.Item>
                    <Tabbar.Item icon={<SettingO />}>我的</Tabbar.Item>
                </Tabbar>
            </div>
        );
    }
}

export default withRouter(Mycls);

